package router

import (
	"cgs-server/server"
	"cgs-server/server/cgs/app/api"
	"cgs-server/server/cgs/app/store/mongo"
)

func initWorksheetInfoRouter() {
	storeIns, _ := mongo.GetMongoFactory()

	handler := api.NewWorksheetInfoHandler(storeIns)

	server.Get("/api/app/worksheet/info/get", handler.Get, "", server.Login)
	server.Get("/api/app/worksheet/info/listByAppId", handler.ListByAppId, "", server.Login)
	server.Post("/api/app/worksheet/info/save", handler.Save, "", server.Login)
	server.Post("/api/app/worksheet/info/delete", handler.Delete, "", server.Login)
	server.Post("/api/app/worksheet/info/update", handler.Update, "", server.Login)
	server.Post("/api/app/worksheet/info/upload-excel", handler.UploadExcel, "", server.Login)
	server.Get("/api/app/worksheet/info/preview-excel", handler.PreviewExcel, "", server.Login)
	server.Post("/api/app/worksheet/info/import-excel", handler.ImportExcel, "", server.Login)
	server.Post("/api/app/worksheet/info/export-excel", handler.ExportExcel, "", server.Login)
}
